<template>
	<view class="pad-lr-20 pad-tb-20">
		<view class="fontSize-28">{{suggestion_info?.feedback}}</view>
		<view class="display align-items flex-wrap">
			<image :src="item" class="wid-hig-200 radius-16 textimg mar-top-24" mode=""
				v-for="item in suggestion_info?.img" :key="item" @click="seeimg(item)"></image>
		</view>
		<view class="text-align-right fontSize-26 col-9 mar-top-20">
			{{suggestion_info?.create_time}}
		</view>
		<view class="mar-top-20 radius-16 pad-lr-20 pad-tb-20 bgf6" v-if="suggestion_info?.reply">
			<view class="fontSize-28">平台回复：</view>
			<view class="mar-top-20 fontSize-26 col-6">{{suggestion_info?.reply}}</view>
			<view class="text-align-right fontSize-26 col-9 mar-top-20">
				{{suggestion_info?.reply_time}}
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	// import { suggestion_detail } from '@/utils/api'
	import { onLoad } from '@dcloudio/uni-app';
	import { ref } from 'vue';
	onLoad((options) => {
		id.value = options.id
		_suggestion_detail()
	})
	const id = ref(),
		suggestion_info = ref();
	const _suggestion_detail = () => {
		suggestion_detail({ id: id.value }).then(res => {
			if (res.code == 1) {
				suggestion_info.value = res.data.suggestion_info
			}
		})
	}
	const seeimg = (info : string) => {
		uni.previewImage({
			urls: suggestion_info.value.img,
			current: info
		})
	}
</script>

<style lang="scss">
	.textimg {
		margin-left: 20rpx;
		margin-right: 20rpx;
	}
</style>